module Page2.View exposing (..)

import Page2.Msg exposing (Msg)
import Page2.Model exposing (..)
import Html exposing (Html, div, text, program)
import Html.Attributes exposing (class,id)

view : Page -> Html Msg
view model =
  div 
    [id "page2"
    ,class "page"
    ,class "slide"
    ]
    [ div [] [text (.title model)]
    , contact_div (.contact model) 
    , detail_div (.detail model) 
    ]
    

detail_div : Detail -> Html Msg
detail_div detail = 
  div
    []
    [div [] [text (.name detail)]
    ,div [] [text (.school detail)]
    ,div [] [text (.exp detail)]
    ,div [] [text (.github detail)]
    ,div [] [text (.gitee detail)]
    ,div [] [text (.cnblog detail)]
    ,div [] [text (.expect_job detail)]
    ]

contact_div : Contact -> Html Msg
contact_div contact =
  div
    []
    [ div [] [text (.title contact)]
    , div [] [text (.phone contact)]
    , div [] [text (.email contact)]
    , div [] [text (.qq contact)]
    ]
  